package chapter7;

/**
 * Created by lenovo on 2016/3/23.
 */
import static java.lang.System.out;
public class Game1 {
    public static void main(String[] args) {
        play(Action1.RIGHT);
        play(Action1.UP);
    }
    public static void play(Action1 action){
        switch (action){
            case STOP:
                out.println("播放停止动画");
                break;
            case RIGHT:
                out.println("播放向右动画");
                break;
            case LEFT:
                out.println("播放向左动画");
                break;
            case UP:
                out.println("播放向上动画");
                break;
            case DOWN:
                out.println("播放向下动画");
                break;
        }
    }

}
